package com.leon.alishop.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.leon.alishop.model.GoodsInfo;

public interface GoodsInfoDao {
	
	public List<GoodsInfo> selectAll(
			@Param("goodsId")Integer goodsId,
			@Param("providerId")Integer providerId,
			@Param("providerStatus")Integer[] providerStatus,
			@Param("status")Integer[] status, 
			@Param("startRows")int startRows,
			@Param("maxRows")int maxRows);
	public int selectAllCount(
			@Param("goodsId")Integer goodsId,
			@Param("providerId")Integer providerId,
			@Param("providerStatus")Integer[] providerStatus,
			@Param("status")Integer[] status);
	
	public GoodsInfo selectById(Long id);
	
	public GoodsInfo selectByProviderTaobaoGoodsId(Long id);

	public List<GoodsInfo> selectByIds(@Param("ids")Long[] ids);

	public int insertSelective(GoodsInfo goodsInfo);

	public int updateByIdSelective(GoodsInfo goodsInfo);
	
	public int updateFavScoreAndStatusByProviderId(@Param("providerId") Integer providerId,@Param("favScore") Integer favScore,@Param("providerStatus") Integer providerStatus,@Param("status") Integer status);
}
